#pragma once
#include "SimpleIni.h"
#include "Utility.h"

namespace bs
{
	class Config : public CSimpleIni
	{
	public:
		Config() {}
		~Config() {}

		template<class _T>
		_T GetValue(const char* session, const char* key, _T def) const
		{
			const char* val = CSimpleIni::GetValue(session, key);
			if(val)
			{			
				return StrTo<_T>(val);
			}
			else
			{
				return def;
			}
		}

		const char* GetValue(const char* session, const char* key, const char* def) const
		{
			return CSimpleIni::GetValue(session, key, def);
		}
	};
}

